Expand description
The contract every onetaskgraph source is written against.
This crate holds exactly what a plugin author needs in order to implement a
source, and nothing else: the two traits, the work types, the query and paging
types, the capability declaration, and the error enum. The engine that drives
sources lives in onetaskgraph-core, and no plugin crate may depend on it:
deny.toml permits that crate exactly one wrapper, the binary, failing the
required deny job, and scripts/check-plugin-isolation.sh reads the real
cargo metadata graph inside just check.
Keeping this crate still is the point. Every change here rebuilds and re-tests
every plugin, which is exactly the cost the split exists to avoid paying on an
ordinary engine change. When a new type could plausibly sit on either side, it
belongs in onetaskgraph-core unless a trait signature names it.
Structs§
- Asset
- One asset a record holds, as a read reports it.
- Asset
Name - One asset’s name: a bare file name ending in an accepted image extension.
- Asset
Payload - One asset a create or an update carries to a destination.
- Asset
Upload - What a hosted source uploaded for one asset of one record: the bytes’ SHA-256 and the URL it serves them at.
- Asset
Uploads - The value of
MetadataKey::ASSETS_KEYon a destination record: what its hosted source uploaded, by asset name. - Asset
Write - The assets a create or an update of one task or document carries.
- Assets
Written - What an asset-carrying write answers with: where the record now is, and the content the destination stored.
- Capabilities
- One source’s declared abilities.
- Comment
- One comment on a task, as its source holds it.
- Comment
Body - What a comment says: anything at all, except nothing.
- Cursor
- A plugin-defined resume token. The engine stores and returns one; it never interprets one.
- Dependency
Edge - A dependency between two work items.
- Dependency
Endpoint - One endpoint of a dependency edge.
- Document
- One piece of information that lives in a project and is not work.
- Document
Query - A filter over a source’s documents.
- Health
- Whether a source is answering right now.
- Item
Write - One create-or-update of a work item at a destination.
- Label
- A tag a source attaches to work.
- Label
Filter - Label membership, by name rather than by id.
- Metadata
Key - One caller-owned metadata key:
<namespace>.<name>, at least two non-empty segments separated by dots, whose first segment is notMetadataKey::RESERVED_NAMESPACE. - Metadata
Match - One caller-defined metadata value a task must hold.
- Metered
- What one source’s requests have spent against one budget, split by where each figure came from.
- Metering
- Everything one source has sent to its backend since it was built, and what that spent against each budget the backend meters it by.
- Native
Id - A source’s own opaque identifier for one item.
- NewComment
- One comment to add to a task.
- Page
- One page of results, and where to pick up.
- Page
Request - One step of a walk through a result set.
- Project
- A grouping of tasks, shaped like a
Taskwithout a parent of its own. - Project
Query - A filter over a source’s projects.
- Repository
- A repository identified by its normalized origin, without a URL scheme or
.gitsuffix. - Source
Name - The name a configuration document gives one configured source.
- Status
- A source’s status, kept in both normalised and original form.
- Status
Mapping - One source’s
status_mapping: for each status category it mentions, the names it gives each item kind, ornull. - Status
Name - One status name a source’s backend holds: a board option, a workflow state, a project status.
- Task
- One unit of work as a source reports it.
- Task
Detail Read - One task as
TaskSource::get_task_detailsreads it: the task, and the first page of its comments when they were asked for. - Task
Query - A filter over a source’s tasks.
- TaskRef
- One task named by another task’s
Task::deliversorTask::delivered_by. - Task
Update - A targeted update of one existing task. A member left
None(or empty) leaves that field exactly as the source holds it. - Task
Update Outcome - What a source answers a
TaskUpdateof a task it holds with. - Text
Query - A free-text search and the fields it searches.
Enums§
- Asset
Content Type - The content type an asset is stored and served as, decided by its name’s extension alone.
- Dependency
Kind - What a
DependencyEdgemeans. - Dependency
Support - How far a source can walk its own dependency edges.
- Direction
- Which way a dependency query walks the graph.
- Item
Kind - The kind of work item named by a dependency endpoint.
- Location
- Where an entity is, in the one form a consumer can act on without knowing the backend.
- Metadata
Record - Which kind of record a narrow metadata write names.
- Priority
- How much a task matters, in the one vocabulary every source is normalised into.
- Project
Filter - Which project a task must belong to.
- Source
Error - Why a source could not answer.
- Status
Category - The normalised status vocabulary shared across every source.
- Status
Names - What one category of a
status_mappingnames: one name for every kind, or a name for each kind it maps. - Support
- Whether a source applies one predicate itself.
- Text
Fields - Which fields a
TextQuerysearches. - Unmapped
Status - Why a mapping gives no name for one category and one kind.
- Updated
Field - One field of a task a
TaskUpdatenames, as the answer to it reports what was written. - Write
Support - Whether a source can be written through at all.
Constants§
- SIMULATED_
CLOCK_ VARIABLE - The variable that puts a process of this build on a simulated clock.
- SOURCE_
NAME_ PATTERN - The pattern every
SourceNamematches.
Traits§
- Clock
- A source of monotonic time and of waits measured against it.
- Secret
Resolver - How a plugin reads the credential its configuration names.
- Source
Plugin - The factory that turns one configuration block into a live
TaskSource. - Task
Source - One configured source, as the engine drives it.
Functions§
- asset_
references - The assets
contentreferences, each once, in the order it first references them. - asset_
sha256 - The lowercase hex SHA-256 of
bytes: whatAsset::sha256,AssetPayload::sha256andAssetUpload::sha256hold. - assetless
- The refusal a source that keeps no assets answers an asset write with.
- body_
digest sha256:and the lowercase hex SHA-256 ofcontent: what a rendering’sbody_digestrecords.- commentless
- The refusal a source with no comments answers a comment call with.
- documentless
- The refusal a source with no documents answers a document read with.
- is_
sha256 - Whether
digestis a SHA-256 as this contract spells one: 64 lowercase hex digits. - rewrite_
asset_ references contentwith the target of each reference to an assetservednames replaced by the URL it maps to, and every other byte as it was.- serve_
asset_ references - Point a record’s asset references at where a hosted source serves them, and record what it
uploaded: the one way a plugin that declares assets
nativeand serves them at a URL finishes the record it is about to write. - system_
clock - The real clock:
tokio::time::sleepand a monotonicInstant. - unwritable
- The refusal a source with no write side answers a write with.
- unwritable_
field - The refusal a source answers a narrow write of one field of a task with, when it cannot write that field on its own.
- unwritable_
metadata - The refusal a source answers a narrow metadata write with when it cannot make one on its own.
Type Aliases§
- Shared
Clock - One clock, shared by everything a process builds.